package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 文件
 * @TableName uploadfile
 */
@TableName(value ="uploadfile")
@Data
public class Uploadfile implements Serializable {
    /**
     * Id
     */
    @TableId
    private String id;

    /**
     * 文件名称
     */
    private String filename;

    /**
     * 文件路径
     */
    private String filepath;

    /**
     * 描述
     */
    private String description;

    /**
     * 文件类型
     */
    private String filetype;

    /**
     * 文件大小
     */
    private Integer filesize;

    /**
     * 扩展名称
     */
    private String extension;

    /**
     * 是否可用
     */
    private Integer enable;

    /**
     * 排序
     */
    private Integer sortcode;

    /**
     * 删除标识
     */
    private Integer deletemark;

    /**
     * 上传人
     */
    private String createuserid;

    /**
     * 上传人姓名
     */
    private String createusername;

    /**
     * 上传时间
     */
    private Date createtime;

    /**
     * 缩略图
     */
    private String thumbnail;

    /**
     * 所属应用
     */
    private String belongapp;

    /**
     * 所属应用ID
     */
    private String belongappid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Uploadfile other = (Uploadfile) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFilename() == null ? other.getFilename() == null : this.getFilename().equals(other.getFilename()))
            && (this.getFilepath() == null ? other.getFilepath() == null : this.getFilepath().equals(other.getFilepath()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getFiletype() == null ? other.getFiletype() == null : this.getFiletype().equals(other.getFiletype()))
            && (this.getFilesize() == null ? other.getFilesize() == null : this.getFilesize().equals(other.getFilesize()))
            && (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension()))
            && (this.getEnable() == null ? other.getEnable() == null : this.getEnable().equals(other.getEnable()))
            && (this.getSortcode() == null ? other.getSortcode() == null : this.getSortcode().equals(other.getSortcode()))
            && (this.getDeletemark() == null ? other.getDeletemark() == null : this.getDeletemark().equals(other.getDeletemark()))
            && (this.getCreateuserid() == null ? other.getCreateuserid() == null : this.getCreateuserid().equals(other.getCreateuserid()))
            && (this.getCreateusername() == null ? other.getCreateusername() == null : this.getCreateusername().equals(other.getCreateusername()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getThumbnail() == null ? other.getThumbnail() == null : this.getThumbnail().equals(other.getThumbnail()))
            && (this.getBelongapp() == null ? other.getBelongapp() == null : this.getBelongapp().equals(other.getBelongapp()))
            && (this.getBelongappid() == null ? other.getBelongappid() == null : this.getBelongappid().equals(other.getBelongappid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFilename() == null) ? 0 : getFilename().hashCode());
        result = prime * result + ((getFilepath() == null) ? 0 : getFilepath().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getFiletype() == null) ? 0 : getFiletype().hashCode());
        result = prime * result + ((getFilesize() == null) ? 0 : getFilesize().hashCode());
        result = prime * result + ((getExtension() == null) ? 0 : getExtension().hashCode());
        result = prime * result + ((getEnable() == null) ? 0 : getEnable().hashCode());
        result = prime * result + ((getSortcode() == null) ? 0 : getSortcode().hashCode());
        result = prime * result + ((getDeletemark() == null) ? 0 : getDeletemark().hashCode());
        result = prime * result + ((getCreateuserid() == null) ? 0 : getCreateuserid().hashCode());
        result = prime * result + ((getCreateusername() == null) ? 0 : getCreateusername().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getThumbnail() == null) ? 0 : getThumbnail().hashCode());
        result = prime * result + ((getBelongapp() == null) ? 0 : getBelongapp().hashCode());
        result = prime * result + ((getBelongappid() == null) ? 0 : getBelongappid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", filename=").append(filename);
        sb.append(", filepath=").append(filepath);
        sb.append(", description=").append(description);
        sb.append(", filetype=").append(filetype);
        sb.append(", filesize=").append(filesize);
        sb.append(", extension=").append(extension);
        sb.append(", enable=").append(enable);
        sb.append(", sortcode=").append(sortcode);
        sb.append(", deletemark=").append(deletemark);
        sb.append(", createuserid=").append(createuserid);
        sb.append(", createusername=").append(createusername);
        sb.append(", createtime=").append(createtime);
        sb.append(", thumbnail=").append(thumbnail);
        sb.append(", belongapp=").append(belongapp);
        sb.append(", belongappid=").append(belongappid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}